<?php
    session_start();
if (isset($_COOKIE[session_name()])) {
   setcookie(session_name(), '', time()-42000, '/');
}

session_destroy();
    require_once('userlevel.php'); //Require/include the permissions file
    require_once('template.php'); //Require/include the template file

        template_headtag('Logout!');
        template_header();
        template_left();
        echo "<div class='pageheadertext'>You are now logged out!</div>";
        loginbox();
        template_footer();
?>